import request from '@/utils/request/request';
import { RouteRecord } from './model/routeModel';

// 查询路由列表
export function queryRouteRecordList(id: string) {
  return request.get<RouteRecord[]>(`/base/route/get/${id}`);
}

// 新增路由
export function addRouteRecord(data: RouteRecord) {
  return request.post('/base/route/add', data);
}

// 修改路由
export function editRouteRecord(data: RouteRecord) {
  return request.post('/base/route/update', data);
}

// 删除路由，传id，直接拼接在url上
export function deleteRouteRecord(id: string) {
  return request.delete(`/base/route/${id}`);
}
